package com.spring.custom_factory;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class App {
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
		MyServiceImpl myservice001 = (MyServiceImpl) context.getBean("myservice001");
		MyServiceImpl myservice002 = (MyServiceImpl) context.getBean("myservice002");
		List<MyServiceImpl> context1 = MyFactory.getContext();

		System.out.println(myservice001);
		System.out.println(myservice002);
		System.out.println(context1.size());
	}
}
